.TH std::ranges::drop_while_view::end 3 "2024.06.10" "http://cppreference.com" "C++ Standard Libary"
.SH NAME
std::ranges::drop_while_view::end \- std::ranges::drop_while_view::end

.SH Synopsis
   constexpr auto end();  \fI(since C++20)\fP

   Returns a sentinel or an iterator representing the end of the drop_while_view.

   Effectively returns ranges::end(base_), where base_ is the underlying view.

.SH Parameters

   \fI(none)\fP

.SH Return value

   A sentinel or an iterator representing the end of the view.

.SH Example


// Run this code

 #include <array>
 #include <iostream>
 #include <ranges>

 int main()
 {
     constexpr std::array data{0, -1, -2, 3, 1, 4, 1, 5};

     auto view = std::ranges::drop_while_view
     {
         data, [](int x) { return x <= 0; }
     };

     for (auto it = view.begin(); it != view.end(); ++it)
         std::cout << *it << ' ';
     std::cout << '\\n';
 }

.SH Output:

 3 1 4 1 5

.SH See also

   begin   returns an iterator to the beginning
   (C++20) \fI(public member function)\fP
